package com.tencent.wxcloudrun.dao;

import com.tencent.wxcloudrun.model.MaryPost;
import com.tencent.wxcloudrun.model.Post;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @Entity com.tencent.wxcloudrun.model.Post
 */
@Mapper
public interface PostMapper {

    /**
     * 获取文章列表
     * @return
     */
    List<Post> list(Map<String,Object> data);

    /**
     * 获取文章详情
     * @param id
     * @return
     */
    Post getPostdetals(int id);


    String getAvatarUrls(int postid);

    int updateAvatarUrl(String s, int postid);

    int updatelikeCont(String like_count,int postid);

    List<MaryPost> getMaryPostsByOpenid(Map<String, Object> data);

    List<Post> listbycategoriesid(Map<String, Object> data);

    List<Post> listsearchresults(Map<String, Object> data);
    List<Map<String,Object>> getAddressidByopenid(String openid);

    int addpost(String postTitle, String postContent, String addressid, int userId, String date, String categoryname, String post_date);

    List<Post> listbycategoriesidlocal(Map<String, Object> data);
}




